using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Generalization
{
    /// <summary>
    /// <para>Smooth Polygon</para>
    /// <para>Smoothes a polygon to improve visual quality.</para>
    /// <para>平滑多边形以提高视觉质量。</para>
    /// </summary>    
    [DisplayName("Smooth Polygon")]
    public class SmoothPolygon : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SmoothPolygon()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_algorithm">
        /// <para>Smoothing Algorithm</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_tolerance">
        /// <para>Smoothing Tolerance</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public SmoothPolygon(object _in_features, object _out_feature_class, _algorithm_value _algorithm, string? _tolerance)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
            this._algorithm = _algorithm;
            this._tolerance = _tolerance;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Smooth Polygon";

        public override string CallName => "management.SmoothPolygon";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _algorithm.GetGPValue(), _tolerance, _endpoint_option.GetGPValue(), _error_option.GetGPValue(), _in_barriers];

        /// <summary>
        /// <para>Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Smoothing Algorithm</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Smoothing Algorithm")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _algorithm_value _algorithm { get; set; }

        public enum _algorithm_value
        {
            /// <summary>
            /// <para>PAEK</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PAEK")]
            [GPEnumValue("PAEK")]
            _PAEK,

            /// <summary>
            /// <para>BEZIER_INTERPOLATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("BEZIER_INTERPOLATION")]
            [GPEnumValue("BEZIER_INTERPOLATION")]
            _BEZIER_INTERPOLATION,

        }

        /// <summary>
        /// <para>Smoothing Tolerance</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Smoothing Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _tolerance { get; set; }


        /// <summary>
        /// <para>Preserve endpoint for rings</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve endpoint for rings")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _endpoint_option_value _endpoint_option { get; set; } = _endpoint_option_value._true;

        public enum _endpoint_option_value
        {
            /// <summary>
            /// <para>FIXED_ENDPOINT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FIXED_ENDPOINT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_FIXED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_FIXED")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Handling Topological Errors</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Handling Topological Errors")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _error_option_value _error_option { get; set; } = _error_option_value._NO_CHECK;

        public enum _error_option_value
        {
            /// <summary>
            /// <para>NO_CHECK</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CHECK")]
            [GPEnumValue("NO_CHECK")]
            _NO_CHECK,

            /// <summary>
            /// <para>FLAG_ERRORS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FLAG_ERRORS")]
            [GPEnumValue("FLAG_ERRORS")]
            _FLAG_ERRORS,

            /// <summary>
            /// <para>RESOLVE_ERRORS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RESOLVE_ERRORS")]
            [GPEnumValue("RESOLVE_ERRORS")]
            _RESOLVE_ERRORS,

        }

        /// <summary>
        /// <para>Input Barriers Layers</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Barriers Layers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _in_barriers { get; set; } = null;


        public SmoothPolygon SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}